import request from '@/utils/request.js';
// 药品分类列表
export const Drugs = () => {
  return request({
    url: 'pc/Drugs/index',
    method: 'post',
    data: {},
  }).then((res) => {
    return res;
  });
};
// 添加药品
export const addDrug = (data) => {
  console.log(data);
  return request({
    url: 'pc/Drug/add',
    method: 'post',
    data: {
      ...data,
    },
  }).then((res) => {
    return res;
  });
};
// 添加药品分类
export const addDrugs = (data) => {
  console.log(data);
  return request({
    url: 'pc/Drugs/add',
    method: 'post',
    data: {
      ...data,
    },
  }).then((res) => {
    return res;
  });
};
// 药品列表
export const Drug = () => {
  return request({
    url: 'pc/Drug/index',
    method: 'post',
    data: {},
  }).then((res) => {
    return res;
  });
};
// 医院信息
export const hospital = () => {
  return request({
    url: 'pc/Hospital/index',
    method: 'post',
    data: {},
  }).then((res) => {
    return res;
  });
};
// 删除药品
export const deleteDrug = (data) => {
  return request({
    url: 'pc/Drug/del',
    method: 'post',
    data: {
      ...data,
    },
  }).then((res) => {
    return res;
  });
};
// 删除药品分类
export const deleteDrugs = (data) => {
  return request({
    url: 'pc/Drugs/del',
    method: 'post',
    data: {
      ...data,
    },
  }).then((res) => {
    return res;
  });
};
